<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page import = "java.util.*" %>
<%@ page import = "com.jiang.books.domain.*" %>
<%@ page import = "com.sun.org.apache.xerces.internal.impl.dv.util.Base64" %>

<table border="1" bordercolor="FFCC00" style="background-color:FFFFCC">
<tr style="font-weight:bold;font-size:22px">
	<td>Picture</td>
	<td>Id</td>
	<td>About Me</td>
	<td>UserName</td>
	<td>Birthday</td>
	<td>Email</td>
	<td>GroupName</td>
</tr>
<c:forEach var="profile" items="${profiles}">
  <c:set var="picture" value="${profile.userPhoto}" />
  <tr>
		<td><img src="data:image/png;base64,<%=Base64.encode((byte[]) pageContext.getAttribute("picture"))%>"></td>
		<td>${profile.id}</td>
		<td>${profile.aboutMe}</td>
		<td>${profile.user.userName}</td>
		<td>${profile.user.birthday}</td>
		<td>${profile.user.email}</td>
		<td>${profile.user.userGroup.groupName}</td>
  </tr>
</c:forEach>
</table>

